Make --config the primary flag for local server start#258
Open
sdairs wants to merge 2 commits into
Open
Conversation
Rename the `server start` config flag to `--config`, keeping `--config-file` working as a hidden backward-compatible alias. Updates help text, after_help, output hints, module docs, and README accordingly, and extends the trailing-arg passthrough guard to reject `--config` as well (the `--config` prefix also covers `--config-file`). Closes #252 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
# Conflicts: # crates/clickhousectl/src/local/cli.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #252.
What
clickhousectl local server startnow takes--config <NAME>as the primary flag. The old--config-filekeeps working as a hidden backward-compatible alias (still parses, but no longer shown in--help).Changes
local/cli.rs— flag is now#[arg(long = "config", alias = "config-file", ...)]; help text +after_helpreference--config. Tests:parses_server_start_config(new primary) andparses_server_start_config_file_legacy_alias(alias still parses).local/mod.rs— trailing-arg passthrough guard now rejects--config(the prefix also covers--config-file); updated comment + error message.local/output.rs—server configshints now say--config; updated test assertion.local/config.rs— CLI-flag references in module/fn docs updated to--config.README.md— custom-config docs updated to--config, with a note that--config-fileremains a legacy alias.Testing
cargo build,cargo test -p clickhousectl,cargo clippy --all-targetsall pass.--configappears in--help,--config-filedoes not; passthrough rejection fires for both.🤖 Generated with Claude Code
Note
Low Risk
CLI surface and documentation only; behavior for named configs is unchanged aside from stricter rejection of
--configin trailing server args.Overview
clickhousectl local server startnow documents and surfaces--config <NAME>as the way to apply a named overlay from~/.clickhouse/configs/.--config-fileremains a clap alias so existing scripts keep working.Help text, README custom-config examples,
server configshints, and module comments are aligned on--config. Trailing-arg validation now rejects--config(prefix match also covers--config-file) so raw ClickHouse config paths cannot bypass managed overlay handling. Tests cover parsing--configand the legacy alias.Reviewed by Cursor Bugbot for commit 4d355e4. Bugbot is set up for automated code reviews on this repo. Configure here.